﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login_New.aspx.cs" Inherits="BF.Web.Login_New" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        body {
            background-image: url("/images/bg.jpg");
        }
         
        .transparent-window,
        .transparent-window .x-window-body, 
        .transparent-window .x-panel-body {
            background-color: transparent;
        }
         
        .transparent-panel {
            background-color: transparent;
        }
    </style>
    <script type="text/javascript">
        if (window.top.frames.length !== 0) {
            window.top.location = self.document.location;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Window ID="Window1" runat="server" Closable="false" Resizable="false" Height="150"
        Icon="Lock" Title="系统登录" Draggable="false" Width="350" Modal="true" Padding="5"
        Layout="Form"  Cls="transparent-window">
        <Items>
            <ext:FormPanel ID="FormPanel1" runat="server" BodyCls="transparent-panel" Border="false">
                <Items>
                    <ext:TextField ID="txtUsername" runat="server" FieldLabel="账号" AllowBlank="false"
                        BlankText="账号不能为空！" Text="" Width="175" MsgTarget="Side" />
                    <ext:TextField ID="txtPassword" runat="server" InputType="Password" FieldLabel="密码"
                        AllowBlank="false" BlankText="密码不能为空！" Text="" Width="175" MsgTarget="Side" />
                </Items>
            </ext:FormPanel>
        </Items>
        <Buttons>
            <ext:Button ID="btnLogin" runat="server" Text="登录" Type="Submit" Icon="Accept">
                <Listeners>
                    <Click Handler="
                            if (!#{txtUsername}.validate() || !#{txtPassword}.validate()) {  
                                Ext.MessageBox.show({title:'提示',msg:'账号或密码不能为空！',buttons:{'ok':'确定'},icon:Ext.MessageBox.INFO});
                                // return false to prevent the btnLogin_Click Ajax Click event from firing.
                                return false; 
                            }" />
                </Listeners>
                <DirectEvents>
                    <Click OnEvent="btnLogin_Click">
                        <EventMask ShowMask="true" Msg="正在登录..." MinDelay="500" />
                    </Click>
                </DirectEvents>
            </ext:Button>
            <ext:Button ID="btnCancel" runat="server" Text="重置" Icon="Decline">
                <Listeners>
                    <Click Handler="#{FormPanel1}.getForm().reset();" />
                </Listeners>
            </ext:Button>
        </Buttons>
    </ext:Window>
    </form>
</body>
</html>
